package com.teacher.pc.controller;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.teacher.common.CommonResult;
import com.teacher.pojo.dto.job.JobGetDto;
import com.teacher.pojo.vo.coursecontests.CourseContestsGetVo;
import com.teacher.service.ICourseContestsService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 学科竞赛 前端控制器
 * </p>
 *
 * @author zfm
 * @since 2021-08-13
 */
@RestController
@RequestMapping("/pc/course-contests")
public class CourseContestsController {

    @Autowired
    private ICourseContestsService iCourseContestsService;

    /**
     * 查询学科竞赛
     *
     * @param dto
     * @return
     */
    @ApiOperation("查询学科竞赛")
    @GetMapping
    @PreAuthorize("hasAuthority('courseContests_get')")
    public CommonResult<IPage<CourseContestsGetVo>> getPage(JobGetDto dto) {
        return iCourseContestsService.getPage(dto);
    }


}

